const { app } = require('electron');
const CoreWindow = require('ee-core/electron/window');

/**
 * 托盘插件
 * @class
 */
class CloseAddon {

  constructor() {
  }

  /**
   * 创建托盘
   */
  create () {
    
    const mainWindow = CoreWindow.getMainWindow();

    mainWindow.on('close', (event) => {
      app.quit();
    });
    
  }
}

CloseAddon.toString = () => '[class CloseAddon]';
module.exports = CloseAddon;